//
//  BaseTableViewController.swift
//  Sinaweibo
//
//  Created by 李伟 on 16/2/17.
//  Copyright © 2016年 一苇渡江. All rights reserved.
/*
创建tableviewController的基类
为每个子视图添加相同的导航条
*/

import UIKit

class BaseTableViewController: UITableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        
    }
    
    // 为手写代码准备的方法,实现该方法xib/sb失效
    override func loadView() {
        
        // loadView()没有调用super.loadView()之前不能够追踪根视图(view)  会检测view是否为nil 如果为nil又会调用loadView()方法
        super.loadView()
        
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "登录", style: .Plain, target: self, action: "userWillLogin")
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "注册", style: .Plain, target: self, action: "userWillRegister")
        
    }
    
    
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    // MARK: - Table view data source

    override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        // #warning Incomplete implementation, return the number of sections
        return 0
    }

    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        // #warning Incomplete implementation, return the number of rows
        return 0
    }

    
}
